GRAPHICS   Graphics information can be represented as a bitmap in a painting or as object-orientated data in a drawing. Graphic files can contain paintings or drawings — or a mixture of both! Paintings qqqqqqq   A painting application creates a bitmap image of specified size and resolution — the result is only really suitable for presentation on a device whose resolution matches that of the image. Inside a Painting Application wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww   The application’s palette includes a number of tools, including devices for creating straight or freehand lines, square-cornered or rounded rectangles, ovals and other polygons. The line width, colour and line pattern for these tools, together with fill colour and fill pattern can be selected as desired. A brush and spray can are also available for artistic effects. Like real paint and canvas it’s not easy to remove something you don’t want afterwards! Apart from using Undo or Revert the best thing you can do is paint over the unwanted area or use the eraser to get rid of it. The pen tool lets you use the fatbits bit-by-bit editing method (first introduced in MacPaint) to make very minor changes. You should view the image at increased magnification or scale to see what your doing! In some applications 100% magnification is at the size to be printed — in others each pixel in the image is matched to that of the screen, making a 360 dpi picture look five times bigger than its real size! The selection rectangle and lassoo let you select an area of the image — you can then drag it or transform it using any special effects provided by the application. These may include rotation, shearing, distortion and perspective.   Every painting application has its own special features. The following appear in many of them:- To Double-click on Change brush shape Brush Magnify view for fatbits editing Pen Erase whole window Eraser Select entire window Selection rectangle Shrink selection window around item Hold † and make selection Create copy of selected item Press Option and drag Create multiple copies of selected item Press Option-† and drag To restrain horizontally or vertically Press Shift with other key Resizing Bitmaps wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww Paintings are effective for images with detailed shading, grey tones or fine colours. But if you resize a bitmap painting it becomes distorted — its pixels no longer align with those in the display or printer. However, bitmaps can be scaled upwards by as much as 137% whilst retaining a reasonable print quality, although this could be a matter of opinion! Painting File Sizes wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww A painting file can be very large compared with an equivalent drawing (see below) — especially if it contains high-quality colour. These examples are for ClarisWorks images at 360 dpi:- Size (pixels) Actual Size (inches) File Size 450 x 696 1.25 x 1.9 42 K 2000 x 2000 5.5 x 5.5 495 K Drawings wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww   A drawing application uses mathematical descriptions or vectors for each object within the image. The result is suitable for use with any device whatever its resolution. Inside a Drawing Application wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww   The drawing palette shares many of the features found in a typical painting application. It includes tools for creating straight or freehand lines, square-cornered or rounded rectangles, ovals and other polygons. A bezigon tool can be used to create non-uniform Bezier curves that are defined by four control points or handles. The line width, line colour, line pattern, fill colour and fill pattern can be selected as desired. Unlike a painting application you can select any object just by clicking on it — you can then drag it into a new position. You can also reshape an item by dragging on it’s handles — in some applications you can add extra handles to make it easier. Selected items can be rotated or re-scaled. Objects can be grouped together, so that they behave as a single object — you can ungroup them later! They can also be locked to prevent you moving them by accident. Objects can be moved to the front or placed behind other items. More advanced applications use layers to separate different kinds of material. Drawing Resolution and File Size wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww Since object-orientated images are defined mathematically they don’t become distorted when re-sized. Even though they’re usually made using a screen display of 72 dpi there’s no limitation to the accuracy of resolution. Mathematical descriptions don’t need much disk space either — some drawing files can seem unbelievably small! Paintings inside a Drawing wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww A complex bitmap image made using a painting application can be easily pasted or imported into a drawing document containing other simple graphical details. When you add the bitmap it keeps it’s original resolution — but its size in relation to other objects may be set by the viewing scale. You can resize a bitmap in a drawing as easily as any other object. But it can’t be ungrouped — it’s still a bitmap! You should keep the bitmap at its original size in order to avoid distortion. Drawing Documents and Bitmap Applications wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww Some applications, especially painting programs, automatically open drawing documents as a bitmap. When you save the file it won’t contain any vector information — it’s a standard bitmap. This isn’t always helpful, especially since you can’t easily change it back! Having said that, applications such as Graphic Converter can convert bitmaps to drawings by vectorising — it takes time and results are unpredictable, especially for complex images. Using Fonts as Objects wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww Most dingbat fonts include a wide range of useful graphical elements. Unfortunately they’re not so easy to manipulate as graphics — you can’t usually rotate or stretch them! To use a font as an object-orientated graphic it’s best to enable the ATM control panel — if possible give it 448 K or more of RAM and select Preserve Character Shapes. The following methods are known to work with a non-PostScript printer:- METHOD 1 • In ClarisWorks create a drawing document containing just the one character — a large size such as 144-point is best. If possible, trim the character to eliminate any unwanted white areas and then drag it onto the desktop to create a desktop clipping. • Now delete the original character and drag the clipping back into the document. The new image can be manipulated in exactly the same way as any other graphic — and it can be rescaled without any jagged edges! To return the character to a font simply select it and choose Ungroup in the Arrange menu. Alternatively you could save the original character as a PICT file and then insert this file into another ClarisWorks drawing document. Å To use a font as a graphic its files must be kept in the Fonts folder! METHOD 2 Create an EPS file as follows:- • Open the Chooser and select LaserWriter 8 — if AppleTalk isn’t already enabled you’ll have to restart the Mac but you don’t need to install any of the AppleTalk software. • Open your object-orientated drawing application and create a text window as described in Method 1 for ClarisWorks. • Choose Print in the File menu — if you get a warning about page margins it’s best to adjust these before proceeding. In the Print dialog select File for the Destination and then click Save. In the Save dialog you should select:- Format: EPS Mac Enhanced Preview ASCII Level 1 Compatible Font Inclusion: None If you do include fonts the file becomes very large. For example, an EPSF representing a single character expands from 12 K to over 400 K. You should only include the fonts if you want to use the character without the font’s file(s) present in the Fonts folder in your System Folder. You should now be able to insert or place the EPSF into a suitable document. If you want to open the EPSF directly from your favourite graphics application you’ll need to change it’s Creator code using FileTyper, Snitch or a similar utility. Å To use a font as a graphic it’s files must be kept in the Fonts folder or you must use an EPSF containing the font itself! Some applications produce EPSFs directly, but sadly they’re often bitmap versions that can’t be rescaled. TIFFs are just as bad — they’re always bitmaps! Graphics in General qqqqqqqqqqqqqq QuickTime and File Compression wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww   QuickTime may be essential if you want to use all the features in a graphics application. It’s often used to create preview images in dialogs or for dealing with compressed files. Some applications even need it to display pictures! If QuickTime isn’t installed, just place its extension file in the Extensions folder (in the System Folder) and restart your Mac. Many applications compress their files to save disk space — but others may refuse some kinds of compressed file, even if it accepts the file type. Lossless compression doesn’t effect picture quality but lossy compression always removes a small amount of detail. Preview Images and Custom Icons wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww   Some applications add a preview image or custom icon to each graphic document so that you can see its contents in a dialog or in the Finder. The preview image is stored inside the file as a PICT resource. In many applications you create a preview by selecting the document in the Open dialog and clicking on Create Preview. To see previews in future you must check Show Preview. This kind of preview shouldn’t be confused with the other variety found in some EPSF documents (see below) — either or both kind of preview may be found in these files. Some applications provide an option to automatically add a preview or custom icon whenever a file is saved. An unwanted custom icon can be removed inside the Get Info window for the file. Image Resolution wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww   A computer-generated image consists of tiny dots or picture elements, usually known as PixElements or pixels. The size of the dots determines the resolution of any device — usually measured in dots per inch (dpi). A typical display works at 72 dpi whilst a typical printer operates at 300 or 360 dpi. To see a 300 or 360 dpi image properly on a screen requires a viewing magnification or scale of 400 or 500% — this ensures that the image pixels align with those in the screen. Other magnifications may make the image appear distorted when it really isn’t! Í Whatever magnification you use the image will always be printed at normal size and with the best possible resolution. Colour Encoding wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww   Each pixel uses a number to represent its colour or shade of grey. The quantity of bits available per pixel determine how many colours or shades can be represented. Stepped tones need only a few bits but continuous tones require more. The following table shows how many bits per pixel are needed for colour accuracy:- Bits Shades 1 Monochrome (Black & White without shading) 2 4 4 16 8 256 16 32,768 (Thousands) 24 16.7 M (Millions) 32 16.7 M (Millions) + Alpha Channel An Alpha Channel is an 8-bit value used for masking effects in advanced graphics applications. It determines the amount by which a given effect modifies an area of a picture. Í Don’t reduce 24-bit images down to 8-bit, even if you can’t see the detail on your monitor. Even monochrome printers use the 24-bit data to make dithered images. The methods used for encoding are as follows:- RGB A three-colour system designed for a computer monitor containing a cathode ray tube with Red, Green and Blue (RGB) phosphorous. These colours are subtracted from each other in varying degrees to create a particular shade. CMY A three-colour system used in low-cost printers, including certain StyleWriters. Since it’s a printing process it works by colour addition. Historically, the colours of Cyan, Magenta and Yellow (CMY) have been found to give better results than other combinations. By using 100% of each colour channel you obtain:- Y + M = Red Y + C = Green M + C = Blue Y + M + C = Black The results aren’t always what you’d expect — black is a muddy brown! CMYK A four-colour version of CMY that gives better blacks. It uses an extra black channel, which is highly convenient since most printing uses black ink! This also acts a key (K) for precise alignment or registration of other colours. CMYK is used in the better StyleWriters. CMYK is the best system for desktop publishing (DTP). To ensure precise colour matching (from original material to final printing) each image must be kept in CMYK form throughout every stage of preparation. Dither wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww Many devices simply don’t have enough bits per pixel to display all shades, but an illusion of shading can be created by switching the states of individual pixels or groups of pixels to create a dithered image. Although effective, it compromises the resolution.   The Mac itself and some applications automatically dither images to improve appearance on an output device, as shown above for a monochrome screen or printer. It works well with limited resolution devices but can introduce unpleasant banding on some images. Two kinds of dither can be used:- Pattern or Repetitive Dither As shown above, this uses a regular patterns of dots. The image has reasonable tones but appears rather coarse, with its obtrusive patterning. Scatter or Pseudo-random Dither A more natural arrangement, in which the dots are closely related to the image contents, giving a more natural result. This can take a long time to process. Half-tone wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww Half-toning is similar to dither but uses evenly spaced dots that vary in size. In a 300 dpi laser printer each dot (of 16 possible different sizes) is inside a square of 16 pixels (4 wide by 4 high) — by varying the dot size it’s possible to represent 16 shades or stepped tones. In the above example the effective resolution of the printer is reduced by a factor of four. With half-toning, the actual fineness of reproduction is measured by dot density or line screen, often given as a value in lines per inch (lpi). For our 300 dpi printer using a 4 by 4 pixel square the line screen is given by:- Line Screen = 300 ÷ 4 = 75 lpi The following table provides useful comparisons:- Printer Pixel Line Number of Resolution (dpi) Square (pixels) Screen (lpi) Shades 300 4 x 4 75 16 300 5 x 5 60 25 600 10 x 10 60 100 In reality the number of perceptible shades is usually less than half the number shown. It’s also worth noting that a 300 dpi / 60 lpi laser printer with PhotoGrade actually gives 50% more visible shades than a standard 600 dpi / 60 machine. PhotoGrade achieves this by adjusting the size of pixels as well as dots. Screening for DTP In desktop publishing (DTP) the conversion of images from original continuous tones into a halftone is known as screening. It’s part of the process of preparing material for screen printing and this facility may be included in your DTP application. High-quality screen printing often employs unusual techniques, including dots with different shapes. One variation uses a black halftone screen at 45° to the paper with other colours at different angles! Typically a line screen of 53 or 60 lpi is used for a 300 dpi printer or 100 lpi for a 600 dpi machine. For high-quality colour work 133 lpi is common. If the line screen is too high for a specific printer you may get odd effects! Preparing Images for Screening When creating or scanning an image for screen printing you should use a of:- Resolution = 2.5 x Line Screen where resolution is in dpi line screen is in lpi. Here are some typical examples:- Line Screen (lpi) Quality Max/Min Image Resolution (dpi) 50 300 dpi laser 100/125 130 Newsprint 260/325 150 Magazine print 300/375 Supposing your final work is to be at 100 lpi then:- Resolution = 2.5 x 100 = 250 dpi If the final image is to be scaled down by 80% you can reduce the resolution to:- Resolution = 2.5 x 100 x 80% = 200 dpi Í If you scan an image that’s already screened you’ll get moiré patterns. To minimise this use the highest resolution possible — and try to avoid screening the final result! Í Reasonable results can be obtained by scanning a monochrome screened image with the scanner set to line art in black and white. Generic Graphic Documents wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww You may have documents created by applications you don’t have or files with a Creator code of ANON or Anon. These can be opened from within any suitable application. When you double-click on such a file in the Finder it may not launch an application — but if Macintosh Easy Open is installed you’ll get a list of applications that can accept it. Computer-aided design (CAD) applications often use special file formats for transferring data, such as Data Exchange Format (DXF) or Initial Graphics Exchange Specification (IGES). Conversion between these and other graphics formats may be tricky.   GraphicConverter can convert many graphics files from one types into another. During conversion a drawing may end up as a bitmap painting, since most file types, with the notable exceptions of PICTs and EPSFs, can only store bitmaps. The following list includes many generic documents with Type codes in brackets:- Picture (PICT)   A standard QuickDraw picture format used by all Mac applications for bitmap paintings and object-orientated drawings. Other files also contain PICT resources that are used to store images used by the Mac itself. PICT 1 files are monochrome and are often dithered whilst PICT 2 offers millions of colours or greyscale. Some applications don’t show which type they support but most modern applications accept both. PICTs use around 500 K for a single page of A4 at 300 dpi without greys, increasing to between 2 and 5 M for a page with greys, and even more for colour. PICTs are usually compressed using Run Length Encoding (RLE) but with QuickTime enabled they may be compressed using JPEG techniques (see below). The JPEG compressed file is stored as a JFIF inside a PICT header, thus making it available to any application, whether it’s aware of the existence of JPEG compression or not! Í SimpleText can open PICT files but can’t create them! PICT files created by other applications can be opened from within SimpleText or via Macintosh Easy Open. ˝ PCs use a filename extension of .PIC. PostScript (TEXT) A PostScript description of a drawing, painting or a page of formatted text that may also contain images. The content tells a PostScript printer how to print the document. Files can be created with Illustrator or Freehand and are easily converted into EPSF form. PostScript images aren’t properly reproduced by non-PostScript printers or fax modems. In many PostScript applications you can copy a PostScript image into a non-PostScript (QuickDraw) application by pressing Option whilst you select Copy. ù See the PostScript chapter for more about these files ™ Special applications are necessary to open these files. If you try to open one in the Finder Macintosh Easy Open offers you all the applications that can open text files! ™ PostScript files are of Type TEXT. ˝ PCs use a filename extension of .PS or .TXT. Encapsulated PostScript File (EPSF)   The universal standard for desktop publishing (DTP) on any computer. It contains a PostScript description of a drawing, painting or a page of formatted text (with drawings or paintings) that’s understood by any PostScript application or printer. EPSF images behave as PostScript data when used in a PostScript application (see above). Some applications that open EPSFs automatically convert them into a bitmap. ù See the PostScript chapter for more about these files ™ Not all applications can open all varieties of EPSF. ™ Some EPSFs may be compressed using JPEG compression. ˝ PCs use a filename extension of .EPS. Bitmaps (BINA)   The standard format for bitmap paintings in Microsoft’s Windows. A header within the file shows if the file is:- Monochrome 4-bit colour 8-bit colour 24-bit colour Different header formats are used for files created in OS/2 and Windows. Run Length Encoding (RLE) compression may be used with these files, but isn’t supported by all Windows applications. ˝ PCs use a filename extension of .BMP. Graphic Interchange File Format (GIFf)   Universally used for sending bitmap paintings via CompuServe and over the Internet, particularly the World Wide Web. Files provide up to 8 bits per pixel, a maximum of 256 colours or shades of grey. GIFfs use built-in file compression. They come in two versions:- 87a: the original form, not supporting comments or transparent mode 89a: the latest version, not accepted by all viewer applications ˝ PCs use a filename extension of .GIF. Group 3 Fax Format Used for sending dithered grey images via any Group 3 fax machine with a resolution of 203 dpi horizontally and 98 dpi vertically — increasing to 198 dpi vertically in Fine mode. JPEG File Interchange Format (JFIF or JPEG)   Used for sending high quality images on theWorld Wide Web. A JFIF file contains essentially raw JPEG data as used on non-Mac computers. Although JPEG is supported by QuickTime some applications use their own software instead! The Joint Photographic Experts Group (JPEG) was set up by the International Standards Organisation (ISO) and the International Telegraph and Telephone Consultative Committee (CCITT) to develop new methods of image compression. JPEG compression can use a lossless process to halve file size, but more often uses a lossy technique to reduce the size by a factor of 10 to 30. The latter is a destructive system that removes information not easily seen by the human eye. It works best with high quality 24-bit source material — if you convert GIFfs to JFIFs they may appear distorted. The JPEG process converts RGB colour data into YUV form, where Y is the luminance or brightness and U and V are the colour. U and V use only half the resolution of Y, exploiting the eye’s inability to see colour detail. The YUV planes are divided into 8 by 8 blocks of pixels that are Fourier transformed into fewer values of lower frequency. Variable length encoding is used to minimise the data needed for repetitive image patterns. The image size is limited to 65,536 pixels on any side! Í Motion JPEG (M-JPEG) files are variants that contain a series of JPEG images used to provide Full Motion Video (FMV) — don’t confuse these with MPEGs! You’ll need an extra card in your Mac to play these files. This card speeds up the compression process by a factor of 100. Í JFIFs are often called JPEG files — the file Type may be JFIF or JPEG! ˝ PCs use a filename extension of .JPG. MacPaint (PNTG)   For a 72 dpi black and white dithered bitmap painting of 576 by 720 pixels — that’s 8" x 10". Files are automatically compressed to around 5 K. These files aren’t really generic — they’re history! They usually have a Creator code of MPNT. Raster Image File Format (RIFF) Used by Letraset for a greyscale bitmap painting. Not often encountered. StartUpScreen (SCRN)   A special file containing a PICT resource that replaces the standard display that the Mac shows at startup. This file replaces both the initial Welcome to Macintosh message and the Mac OS window with progress bar supplied by System 7.5. A small startup screen image is useful if you want to avoid the extension and control panel icons spreading over the image during startup! Alternatively, you can adjust the image to match the screen size. The file can be prepared using ResEdit, GraphicConverter or similar application. It must contain a single PICT resource with an ID of 0 and the file name must be StartUpScreen. If you want a startup message you must include the text as part of the PICT resource image. The file must be placed in the System Folder — not in the Extensions folder. Tagged Image File Format (TIFF)   For a monochrome, greyscale or colour bitmap painting using RGB or CMYK encoding of any resolution. These files are often used with scanning applications. A TIFF uses less memory than an EPSF but more than a PICT file. The following varieties of TIFF are common:- • Class B: Monochrome A dithered image — if 300 dpi its appearance on a 72 dpi display is disappointing. When printed it’ll look fine, as long as you don’t re-scale it! • Class G: Greyscale Unlike the above this can be easily viewed and re-scaled. When printed it’s converted into a dithered version of maximum resolution. Hence an 8-bit greyscale image at 72 dpi or 150 dpi will print well on a 300 or 600 dpi printer. • Class P: Palette colour — 4 and 8-bit Contains palette colour look-up table describing the set of colours used. The image can be easily viewed, re-scaled and printed. • Class R: Full RGB colour — 24-bit Uses three independent RGB colour channels, each of 8-bit resolution — that’s over 16 million colours! œ TIFFs may be compressed using one of the following algorithms:- LZW: for any image PackBits: black and white images only CCITT 1D: black and white images only Always check the destination application supports the appropriate compression algorithm. An image compressed with LZW is often more than halved in size. œ There are two orders in which bytes may be stored. The order is indicated in the file header:- ‘II’ (Intel) ‘MM’ (Motorola) Some DOS and Windows applications only accept the Intel variety. Å Not all applications support all TIFF types, compression systems or byte orders. Be prepared for complications! ˝ PCs use a filename extension of .TIF. X11(TEXT) In this uncommon format the the width and height of a bitmap painting are recorded at the start of the file. This is followed by the image itself as an array of characters. The file Type is usually TEXT. ©Ray White. All Rights Reserved 1997